package com.smart.seckilldemo.commons.exception;

import lombok.Getter;

/**
 * 状态码泛型
 */
@Getter
public enum StatusCode {
    SUCCESS(200, "success"),
    LOGIN_ERROR(333,"登陆失败"),
    LOGIN_DATE_ERROR(434,"用户信息失效 请重新登陆"),
    ERROR(404, "error"),
    ORDER_NUM_ERROR(5024,"订单号生成失败"),
    SECKILL_TIME_ERROR(5004,"秒杀失败 时间未到或者已超过秒杀时间"),
    SECKILL_NULL_ERROR(5005,"秒杀失败 库存为空"),
    SECKILL_ERROR(5007,"该商品每个人限购一件"),
    ORDER_ERROR(5018,"订单错误"),
    LOCK_ERROR(5111,"锁未释放"),
    REDIS_ERROR(5114,"缓存删除失败"),
    PN_ERROR(666,"账号或者密码错误，请重试"),
    SYS_ERROR(4000, "系统错误!!! 请稍后再试"),
    EMAIL_ERROR(4001,"邮箱错误请重新输入"),
    REGISTER_ERROR(4008,"用户名重复，注册失败，请重试"),
    KEY_ERROR(4009,"输入违规字符,请重试"),
    PARAMETERS_ERROR(4010,"参数输入错误请重新输入"),
    SERVER_ERROR(5000, "服务器错误");
    private int status;
    private String message;
    StatusCode(int status, String message) {
        this.status = status;
        this.message = message;
    }
}
